#ifndef __FLASH_INFO_H__
#define __FLASH_INFO_H__

#include "stdbool.h"
#include "board.h"

#define WRITE_FLASH_RASPBERRY_PI_SIGNAL    ((uint8_t)1)
#define WRITE_FLASH_REPLY_SIGNAL           ((uint8_t)2)
#define WRITE_FLASH_INFO_HEADER            ((uint8_t)0xfe)
#define WRITE_FLASH_SUCCESSFUL             ((uint8_t)0xfd)

#define WRITE_FLASH_BUFFER_LENGTH          ((uint8_t)64)
#define WRITE_FLASH_DATA_LENGTH            ((uint8_t)(8+2))

enum Write_flash_status_e
{
    E_WRITE_FLASH_STATUS_IDLE = 0,
    E_WRITE_FLASH_STATUS_REPLY_OVER,
    E_WRITE_FLASH_STATUS_GET_INFO_HEADER,
    E_WRITE_FLASH_STATUS_RECEIVE_DONE
};

void Write_read_flash_info(uint8_t DevEui[], uint8_t length);


#endif
